// API集中管理
// 下面的实现参照: https://www.uviewui.com/js/http.html#_3-api集中管理
const http = uni.$u.http

// 认证相关接口
// 登录接口
export const APILogin = params => http.post('/auth/login', params)
// 注册接口
export const APIRegister = params => http.post('/auth/register', params)
// 获得个人信息接口
export const APIPersonInfo = params => http.post('/auth/info', params)  // 后端需要新增该接口

// 发帖相关接口
// add todo
export const APIAddTODO = params => http.post('/todos/', params) 
// delete todo
export const APIDelTODO = params => http.delete('/todos/', params) 
// get all todo
export const APIGetAllTODO = params => http.get('/todos/', params) 
// get a todo
export const APIGetATODO = (params, config = {}) => http.get('/todos/', params, config) 
// update a todo
export const APIUpdateTODO = params => http.put('/todos/', params)  

